<?php
/**
* phpCan - http://idc.anavallasuiza.com/
*
* phpCan is released under the GNU Affero GPL version 3
*
* More information at license.txt
*/

namespace data\formats;

defined('ANS') or die();

class Text extends Formats implements iFormats {
	var $format = 'text';

	public function check ($value) {
		$this->error = array();

		return $this->validate($value);
	}

	public function valueDB (\data\Data $Data, $value, $language = '', $id = 0) {
		$value[''] = strip_tags($value['']);

		return $value;
	}

	public function settings ($settings) {
		$this->settings = $this->setSettings($settings, array(
			'' => array(
				'db_type' => 'text',

				'length_max' => '',
				'length_min' => '',
			)
		));

		unset($this->settings[$this->name]['db_length_max']);

		return $this->settings;
	}
}
?>